using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Lesson6 : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            GameObject obj = ResMgr.GetInstance().Load<GameObject>("Perfab/Cube");
            Debug.LogFormat("同步加载完成 name:{0}", obj.name);
        }
        if (Input.GetMouseButtonDown(1))
        {
            ResMgr.GetInstance().LoadAsync<GameObject>("Perfab/Sphere", (obj)=>
            {
                Debug.LogFormat("异步加载完成 name:{0}", obj.name);
            });
        }
    }
}
